<?php

namespace app\api\controller\foods;

use app\api\controller\Controllers;
use app\api\service\foods\FoodCategory;
use app\api\service\order\ShoppingCart;

class Foods extends Controllers
{
    /**
     * 菜品列表
     * @param FoodCategory $foodCategory
     * @return \think\Response
     */
    public function lists(FoodCategory $foodCategory, ShoppingCart $shoppingCart)
    {
        return success([
            'sum' => $shoppingCart->count(),
            'lists' => $foodCategory->lists()
        ]);
    }

}
